package com.spring.constructionDI;

import com.spring.dao.UserDao;

/**
 * @ClassName: UserService
 * @Description: TODO
 **/
public class UserService {

    private UserDao  userDao;

    //通过构造函数进行依赖注入
    public UserService(UserDao userDao){
        this.userDao = userDao;
    }

    public int save(){
        return  userDao.save();
    }
}
